﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using EntityObjects;
using BAL.Controller;

namespace PresentationLayer.View.StoreClerk
{
    public partial class Notification_RetrivalForm : System.Web.UI.UserControl
    {
        NotificationController nc=new NotificationController();
        
        protected void Page_Load(object sender, EventArgs e)
        {
            
                 try
            {
                if (!IsPostBack)
                {
                    Bind();
                    
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('Error!!! Plz try again later');</script>");

            }
        }
          protected void Bind()
        {
             
            int Count = 0;

            Count = nc.getRequistionCountByApprovedStatus();
           
            if (Count == 0)
                Label1.Text = "No requisition available for approval!!";
            else

               Noti_Requisition.Text = "New Requisitions: " + Count;
          
          
        }

        }
    }
